package org.example.dayu521.conf;

import feign.RequestInterceptor;
import feign.RequestTemplate;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Profile;


@Configuration
public class FeignConf {

    public static final class FeignInterceptor implements RequestInterceptor {

        @Override
        public void apply(RequestTemplate requestTemplate) {
            requestTemplate.header("Version",WebMvc.getVersion());
        }
    }

    @Bean
    public RequestInterceptor feignInterceptor(){
        return new FeignInterceptor();
    }
}